<template>
  <div class="goodslist-box">
    <div v-for="item in categoryList" :key="item.id">
      <h3>{{ item.name }}</h3>
      <Products :goodslist="item.goodsList" />
    </div>
  </div>
</template>

<script>
import Products from "@/components/Products";
export default {
  props: ["categoryList"],
  components: {
    Products,
  },
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.goodslist-box {
  margin-top: 0.2rem;
  width: 100%;
  text-align: center;
  background-color: #fff;
  h3 {
    font-size: 20px;
    line-height: 0.5rem;
    padding-top: 0.2rem;
  }
}
</style>